package org.flexthinker.binding.validation
{
    import org.flexthinker.binding.form.FormModel;

    import mx.validators.Validator;

    /**
     * Interface describing a validator that is used by a FormModel
     */
    public interface FormModelValidator
    {
        function getFormModel():FormModel;
        function setFormModel( value:FormModel ):void;

        function addPropertyValidator( validator:Validator ):void;
        function removePropertyValidator( validator:Validator ):void;

        function validateProperty(propertyName:String=null):ValidationResults;
        function validateAll():ValidationResults;
    }
}